<?php
namespace app\api\controller;
use \think\Controller;
use \think\Db;
use \think\Session;
class Mach extends Controller
{
	public function MachList(){
		$gid=input('gid');
		if($gid==null){
		$games=Db::name("game")->select();
		return json($games);
	}else{
		$games=Db::name('game')->where('gid',$gid)->find();
		return json($games);
		
	}
	}
	////比赛列表和详情
	
}